<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>内联编辑</title>
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <script src="../ckeditor.js"></script>
</head>
<body>
<div id="editable" contenteditable="true">
    <h1>Inline Editing in Action!</h1>
    <p>The div element that holds this text is now editable.
</div>

<h1><a href="javascript:;" onclick="getData();">获取数据</a></h1>
<script>
    CKEDITOR.disableAutoInline = true;
    CKEDITOR.inline( 'editable' );
    //获取数据
    function getData() {
        var data = CKEDITOR.instances.editable.getData();
        alert(data);
    }
</script>
</body>
</html>